<template>
  <t-button @click="openMessage('success','成功')">成功</t-button>
  <t-button @click="openMessage('warning','警告')">警告</t-button>
  <t-button @click="openMessage('info','消息')">消息</t-button>
  <t-button @click="openMessage('error','错误')">错误</t-button>
</template>

<script>
export default {
  methods: {
    openMessage(type, content) {
      this.$message({
        type,
        content,
        close: true
      })
    }
  }
}
</script>

<style scoped>

</style>